Methods and system for position stabilization

ABSTRACT

Various embodiments of the present technology may provide methods and systems for position stabilization. The methods and systems for position stabilization may be integrated within an electronic device. An exemplary system may include a driver circuit responsive to a gyro sensor and a feedback signal from an actuator. The driver circuit may be configured to calibrate a gain applied to a drive signal based on the posture of the electronic device.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims the benefit of U.S. Provisional PatentApplication Ser. No. 62/780,704, filed on Dec. 17, 2018, andincorporates the disclosure of the application in its entirety byreference.

BACKGROUND OF THE TECHNOLOGY

Many electronic devices have an imaging system integrated within them,and in some cases, the electronic device may be turned and/or rotatedfor the purpose of a desired image capture. In many cases, the imagingsystem may be controlled by an optical imaging stabilization (OIS)system. In particular, the OIS system may operate to stabilize variouscomponents of the imaging system, such as a lens, and to correct forinvoluntary movements of the electronic device, for example movementscaused by a shaking hand (hand tremors). However, as the posture of theelectronic device changes, gravity may influence the optical imagestabilization system and/or a position of the lens in a non-uniformmanner. This non-uniform influence may be due, in part, to how variouscomponents in the imaging system, such as coils, springs, etc., respondto gravity. As a result, given a specific target position code, theactual position of the lens may vary depending on the particularposture.

SUMMARY OF THE INVENTION

Various embodiments of the present technology may provide methods andsystems for position stabilization. The methods and systems for positionstabilization may be integrated within an electronic device. Anexemplary system may include a driver circuit responsive to a gyrosensor and a feedback signal from an actuator. The driver circuit may beconfigured to calibrate a gain applied to a drive signal based on theposture of the electronic device.

BRIEF DESCRIPTION OF THE DRAWING FIGURES

A more complete understanding of the present technology may be derivedby referring to the detailed description when considered in connectionwith the following illustrative figures. In the following figures, likereference numbers refer to similar elements and steps throughout thefigures.

FIG. 1 is a block diagram of an optical image stabilization system inaccordance with an exemplary embodiment of the present technology;

FIG. 2 is a block diagram of a driver circuit in accordance with anexemplary embodiment of the present technology;

FIG. 3A representatively illustrate a first posture of an electronicdevice in accordance with the present technology;

FIG. 3B representatively illustrate a second posture of the electronicdevice in accordance with the present technology;

FIG. 3C representatively illustrate a third posture of the electronicdevice in accordance with the present technology;

FIG. 3D representatively illustrate a fourth posture of the electronicdevice in accordance with the present technology;

FIG. 3E representatively illustrate a fifth posture of the electronicdevice in accordance with the present technology;

FIG. 3F representatively illustrate a sixth posture of the electronicdevice in accordance with the present technology;

FIG. 4 is a graph illustrating a lens position at a particular targetposition for various postures of the electronic device in accordancewith the present technology;

FIG. 5 representatively illustrates the driver circuit converting a gyrosignal into a zone value in accordance with an exemplary embodiment ofthe present technology;

FIG. 6 is a conversion chart for converting an angle into a zone valuein accordance with an exemplary embodiment of the present technology;

FIG. 7 representatively illustrates an accelerometer coordinate systemin accordance with an exemplary embodiment of the present technology;

FIGS. 8A-8B is a flow diagram for selecting a gain value in accordancewith an exemplary embodiment of the present technology;

FIG. 9 is a chart illustrating the relationship between various gainvalues, angles, and zone values in accordance with an exemplaryembodiment of the present technology; and

FIG. 10 representatively illustrates calculating a gain ratio inaccordance with the present technology.

DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS

The present technology may be described in terms of functional blockcomponents and various processing steps. Such functional blocks may berealized by any number of components configured to perform the specifiedfunctions and achieve the various results. For example, the presenttechnology may employ various controllers, amplifiers, signalconverters, drivers, current sources, voltage sources, logic gates,semiconductor devices, such as transistors, capacitors, and the like,which may carry out a variety of functions. In addition, the presenttechnology may be integrated in any number of electronic systems, suchas imaging systems, automotive, aviation, “smart devices,” portables,medical, scientific, surveillance, and consumer electronics, and thesystems described are merely exemplary applications for the technology.

The present technology may be used in conjunction with any positionsensor circuit that may benefit from gravity compensation, such as aposition sensor used for motor control and a gyro sensor used fordetecting the position of a cell phone. Further, the present technologymay employ any number of conventional techniques for capturing imagedata, converting data signals, filtering data signals, generating driversignals, and the like.

Methods and systems for position stabilization according to variousaspects of the present technology may be integrated within any suitableelectronic device or system, such as imaging systems, “smart devices,”wearables, consumer electronics, and the like. According to variousembodiments, the present technology may generate a position signal,determine a posture or position of the electronic device, and apply anappropriate gain value to the position signal for the determined postureor position.

Referring to FIG. 1 , an exemplary system 100 may be integrated in anelectronic device, such as a cell phone comprising an imaging system. Invarious applications, the system 100 may operate to stabilize variouscomponents of the imaging system, such as a lens 120, and to correct formovements of the cell phone, for example movements caused by involuntarymovements, such as hand tremors, or voluntary movements, such as posturechanges to the electronic device. In the present application, the system100 may be referred to as an optical image stabilization (OIS) system.According to various embodiments, the system 100 may comprise a gyrosensor 105, a driver circuit 110, and an actuator 115. The system 100may be configured as a closed-loop system (e.g., as illustrated in FIG.1 ) or an open-loop system.

The gyro sensor 105 measures the orientation, rotation, motion, and/orangular velocity of the electronic device and generates a correspondinggyro signal. In an exemplary embodiment, the gyro signal may be adigital signal. The gyro sensor 105 may be connected to the drivercircuit 110 and configured to transmit the gyro signal to the drivercircuit 110. The gyro signal may comprise a first signal correspondingto an acceleration of the device (a gyro acceleration signal G_(ACC))and/or a second signal corresponding to an angular velocity of thedevice (a gyro velocity signal G_(VEL)). The gyro sensor 105 may detectthe angular velocity due to the Coriolis force that is applied to avibrating element. This motion produces a potential difference as aresult of sensing the angular velocity.

According to an exemplary embodiment, the gyro acceleration signalG_(ACC) may comprise three components, each corresponding to an axis ofa reference coordinate system. For example, the gyro acceleration signalG_(ACC) may comprise an x-component, a y-component, and a z-component.

The gyro sensor 105 may comprise any suitable sensor system or deviceconfigured to detect motion, rotation, and/or angular velocity producedby external factors and generate a corresponding electrical signal. Thegyro sensor 105 may be selected according to a particular applicationand may be selected according to various specifications, such as sensingrange, output type, supply current, operating temperature and the like.

The actuator 115 may be configured to move the lens 120 along variousaxes (e.g., along an x-, y-, and/or z-axis) to improve image quality.The actuator 115 may comprise any suitable device or system capable ofmoving and/or repositioning the lens 120 in response to a signal. Theactuator 115 may be configured to move the lens 120 for the purpose ofperforming autofocus functions, counteracting involuntary movements,such as hand jitter or shaking, and the like. For example, in oneembodiment, the actuator 115 may comprise a voice coil motor, comprisinga driving magnet (not shown) and a sensing magnet (not shown), that isresponsive to a drive signal S_(DR) from the driver circuit 110. Theactuator 115 may be limited in the amount of movement it can perform,whether self-limiting or due to the design of the system. For example,the lens 120 may be enclosed in a housing (not shown) with sidewalls. Assuch, a maximum range of movement the actuator 115 may impart to thelens 120 may be limited by the interior dimensions housing.

The lens 120 may be configured to focus light on an image sensor (notshown). The lens 120, the actuator 115, and the driver circuit 110 mayoperate in conjunction with each other to provide an autofocus function.For example, the actuator 115 may respond to the driver circuit 110 tomove the lens 120 either closer to or away from the image sensor tofocus an image/scene on the image sensor. The lens 120 may further beconfigured to move along a plane that is parallel to the sensing surfaceof the image sensor (i.e., up and down, side-to-side).

The lens 120 may comprise any lens or lens system suitable for focusinglight on the image sensor. For example, in various embodiments, the lens120 may comprise a plurality of lens elements arranged adjacent to eachother. Alternatively, the lens 120 may comprise a single lens element.The lens 120 may be formed using any suitable material, such as glass,quartz glass, fluorite, germanium, meteoritic glass, polycarbonate,plastic, high-index plastic, and the like, or any combination thereof.

The driver circuit 110 controls and supplies power to various deviceswithin the system 100. For example, the driver circuit 110 may supplypower to the actuator 115 via the drive signal S_(DR). The drive signalS_(DR) may control a current or a voltage in the actuator 115, whichcontrols the movement of the actuator 115. Accordingly, the movement ofthe actuator 115 may be proportional to the magnitude of the drivesignal S_(DR). The driver circuit 110 may comprise any suitable controldevice or system capable of providing energy to the actuator 115.

The driver circuit 110 may receive and respond to a feedback signal,such as a hall sensor signal from a hall sensor (not shown). The hallsensor may be configured to detect an actual position of the actuator115 and/or the lens 120. The feedback signal may comprise an analogsignal. Accordingly, the driver circuit 110 may be configured to convertthe analog feedback signal into a digital signal. For example, thedriver circuit 110 may comprise an analog-to-digital converter (ADC) 245to receive the analog feedback signal and convert it into a digitalfeedback signal. The ADC 245 may comprise any circuit and/or ADCarchitecture suitable for converting an analog signal into a digitalsignal.

According to an exemplary embodiment, the driver circuit 110 may utilizethe feedback signal in conjunction with the gyro signals to determine anappropriate amount of power to supply to the actuator 115 based on adesired lens position. In other words, the drive signal S_(DR) may bebased on the feedback signal and the gyro signals.

The driver circuit 110 may further receive and respond to signals fromthe gyro sensor 105. For example, the driver circuit 110 may utilizesignals from the gyro sensor 105 to determine the appropriate amount ofpower to supply to the actuator 115 to achieve a desired position of thelens 120.

According to an exemplary embodiment, the driver circuit 110 may receivethe x-, y-, and z-components of the gyro acceleration signal G_(ACC) andutilize the signal to compute various angles, convert each angle to azone value, and select and apply a gain A to the gyro velocity signalG_(VEL) based on the zone values and/or angles. For example, the x-, y-,and z-components of the gyro acceleration signal G_(ACC) may correspondto one of a plurality of predetermined postures of the electronic device300, and the driver circuit 110 may be configured to apply the gain Abased on various predetermined postures of the electronic device 300. Inother cases, the electronic device 300 may be in a posture other thanone of the predetermined postures. In such as a case, the driver circuit110 may be configured to compute a gain value A according to the x-, y-,and z-components of the gyro acceleration signal G_(ACC). According toan exemplary embodiment, the driver circuit 110 may comprise a firstcircuit portion 201 to receive the gyro acceleration signal G_(ACC) andmay comprise a low-pass filter 205, an angle calculator 210, a converter215, and a gain selector 220.

According to various embodiments, the system 100 may further comprise amemory 200 configured to store a plurality of predetermined gain values,A₁ through A_(N). For example, the memory may store a first gain valueA₁ (e.g., ‘H000’ gain), a second gain value A₂ (e.g., ‘H270’ gain), athird gain value A₃ (e.g., ‘H180’ gain), a fourth gain value A₄ (e.g.,‘H090’ gain), a fifth gain value A₅ (e.g., ‘UP’ gain), and a sixth gainvalue A₆ (e.g., ‘DOWN’ gain). The particular value assigned to each gainmay be selected according to the particular application and priortesting of the system and may be set to a value at or near 0.5. Forexample, ‘H000’ gain=0.46, ‘H270’ gain=0.55, ‘H180’ gain=0.52, ‘H090’gain=0.44, ‘DOWN’ gain=0.48, and ‘UP’ gain=0.53. In various embodiments,the particular values for each gain may be different. However, in somecases, some values may be the same. The memory 200 may comprise a flashmemory or any other suitable memory type. In addition, the memory 200may be integrated within the driver circuit 110, or alternatively, maybe formed on a companion circuit that is accessible to the drivercircuit 110.

According to various embodiments, the gain values may be set accordingto a particular posture of the electronic device 300. In other words,each of the gain values may correspond to a particular posture. Forexample, and referring to FIGS. 3A-3F, a first posture may be defined asan upright position (normal position) of the electronic device 300(e.g., FIG. 3A) and may correspond to the ‘H000’ gain; a second posturemay defined as the electronic device turned on its left side (e.g., FIG.3B) and may correspond to the ‘H090’ gain; a third posture may bedefined as the electronic device 300 turned upside-down (e.g., FIG. 3C)and may correspond to the ‘H180’ gain; a fourth posture may be definedas the electronic device 300 turned on its right side (e.g., FIG. 3D)and may correspond to the ‘H270’ gain; a fifth posture may be defined asthe electronic device 300 turned facing up (e.g., FIG. 3E) and maycorrespond to the ‘UP’ gain; and a sixth posture may be defined as theelectronic device 300 turned facing down (e.g., FIG. 3F) and maycorrespond to the ‘DOWN’ gain. All positions are relative to a referenceground 305 and gravity. Each posture may also be defined according tothe x-, y-, and z-components of the gyro acceleration signal G_(ACC)and/or the theta, delta, and phi angles.

The low-pass filter 205 may be configured to attenuate variousfrequencies in the gyro acceleration signal G_(ACC). For example, in anexemplary embodiment, the low-pass filter 205 may be coupled to the gyrosensor 105 and configured to receive the x-, y-, and z-components of thegyro acceleration signal G_(ACC). The low-pass filter 205 may beconfigured to filter each component separately. For example, thelow-pass filter 205 may comprise a plurality of sub-filters, whereineach sub-filter is used to filter one component of the gyro accelerationsignal G_(ACC). In an exemplary embodiment, the low-pass filter 205 mayhave a low cut-off frequency to remove noise from the gyro accelerationsignal G_(ACC). The low-pass filter 205 may comprise an infinite impulseresponse digital filter system.

The driver circuit 110 may be further configured to adjust the gyroacceleration signal G_(ACC) and remove a DC offset from each of the x-,y-, and z-components of the gyro acceleration signal G_(ACC) prior tobeing transmitted to the low-pass filter 205. For example, the drivercircuit 110 may comprise a computation circuit 500 configured to receiveeach component of the gyro acceleration signal G_(ACC) and subtract a DCoffset value from each component.

Referring to FIGS. 2, 5, and 7 , the angle calculator 210 may beconfigured to compute various angles, such as a theta angle, a deltaangle and a phi angle, in units of degrees. The theta, delta, and phiangles may be defined according to a reference coordinate system, forexample as illustrated in FIG. 7 . According to an exemplary embodiment,the theta, delta, and phi angles may be computed based on x-, y-, andz-components (X, Y, and Z, respectively) of the gyro acceleration signalG_(ACC). For example, the theta angle may be equal to the arctangent ofY divided by X (i.e., theta=arctangent(Y/X)); the delta angle may beequal to the arctangent of Y divided by Z (i.e., delta=arctangent(Y/Z));and the phi angle may be equal to the arctangent of Z divided by X(i.e., phi=arctangent(Z/X)).

In various embodiments, the angle calculator 210 may be configured toreceive each component (i.e., x-, y-, and z-components) of the gyroacceleration signal G_(ACC) from the low-pass filter 205.

In various embodiments, the angle calculator 210 may comprise anycircuit and/or system suitable for performing division calculations,arctangent calculations, and the like. For example, the angle calculator210 may comprise a system of logic circuits or a field programmable gatearray circuit.

Referring to FIGS. 2, 5, and 6 , the converter 215 may be configured toconvert each computed angle to a zone value. For example, the converter215 may be connected to an output terminal of the angle calculator 210and configured to receive the computed theta, delta, and phi angles.According to an exemplary embodiment, the converter 215 may assign eachof the theta, delta, and phi angles to one of a plurality of predefinedzones, such as zones 1 through 8, based on the particular numericalvalue of each angle.

Each zone may be defined by any suitable range of angles. In anexemplary embodiment, each of the odd-numbered zones (i.e., zones 1, 3,5, and 7) may comprise a 30 degree period, while the even-numbered zones(i.e., zones 2, 4, 6, and 8) may comprise a 60 degree period. Forexample, zone 1 may be defined as all angles ranging from −180 to −165and angles ranging from +165 to +180, zone 2 may be defined as angles−165 to −105, zone 3 may be defined as angles −105 to −75, zone 4 may bedefined as angles −75 to −15, zone 5 may be defined as angles −15 to+15, zone 6 may be defined as angles +15 to +75, zone 7 may be definedas angles +75 to +105, and zone 8 may be defined as angles +105 to +165.Accordingly, a theta angle of −147 degrees corresponds to zone 2.

Alternatively, each zone, both odd-numbered and even-numbered zones, maycomprise a 45 degree period. The range of angles and/or period assignedto each zone may be selected according to the specifications of theactuator, system requirements, desired operating specifications, and thelike.

The converter 215 may generate a theta zone according to the theta angleand the predefined zones, a delta zone according to the delta angle andthe predefined zones, and a phi zone according to the phi angle and thepredefined zones. The particular numerical values of the zones arearbitrary values.

In addition, each zone or combination of zones may be associated with orcorrespond to one of the predetermined postures, as illustrated in FIGS.3A-3F, and/or the predetermined plurality of gain values. For example,odd-numbered zones (i.e., zones 1, 3, 5, and 7) may be associated withthe predetermined postures and the predetermined plurality of gainvalues and may be referred to as “fixed zones.” Even-numbered zone maybe associated with gain values that are between two of the predeterminedgain values.

According to various embodiments, the converter 215 may comprise anycircuit and/or system suitable for converting a numerical angle into anew form by assigning a numerical value to the particular numericalangle.

Referring to FIGS. 2, 8A-8B, 9, and 10 , the gain selector 220 may beconfigured to make a series of comparisons based on the theta, delta,and phi zone values. For example, the gain selector 220 may be connectedto and receive the theta zone, the delta zone, and the phi zone valuesfrom the converter 215. According to an exemplary embodiment, the gainselector 220 uses the theta, delta, and phi zone values to determine thegain value A. The gain value A may be selected from a plurality ofpredetermined gain values. Alternatively, the gain value A may becalculated based on the actual value of the theta, delta, or phi angle.The gain selector 220 may cycle through a variety of possiblecombinations of zone values to determine the appropriate predeterminedgain value or compute the gain.

According to an exemplary embodiment, in some cases, the gain selector220 may apply one of the predetermined gain values to the gain velocitysignal G_(VEL). For example, if one zone has a zero value, then the gainselector 220 may select one of the predetermined gains based on thevalue of the remaining zone values. For example, if the theta anglecorresponds to zone 1 and the delta angle corresponds to zone 1 (with nophi zone, because the phi angle is zero), then the gain selector 220 mayselect the ‘H000’ gain value.

In other cases, when every zone has a value other than zero, then thegain selector 220 may be configured to a compute a ratio according tothe various zones. The gain selector 220 may then use the ratio and thepredetermined gain values to compute the gain A. For example, if thetheta angle corresponds to zone 2, the phi angle corresponds to zone 3,and the delta angle corresponds to zone 1, then the driver circuit 110may compute a ratio between a lowest zone (e.g., zone 1) and a highestzone (e.g., zone 3). According to an exemplary embodiment, the ratiocalculation is as follows: Ratio=((val−low)/(high−low)), where ‘val’ isthe angle (in degrees) of an even zone number (e.g., 2, 4, 6, and 8),‘low’ is the low magnitude angle (in degrees) of the lowest zone, and‘high’ is the high magnitude angle (in degrees) of the highest zone.

In the present example, the theta angle corresponds to zone 2, which isthe even zone number. In addition, the low magnitude angle of the lowestzone (i.e., zone 1) is −165, and the high magnitude angle of the highestzone (i.e., zone 3) is −105. Therefore, if theta is −147 degrees, then:ratio=((−147)−(−165))/((−105)−(−165))=0.3. In this case, the ratioindicates that the gain A should consist of 70% of the ‘H000’ gain and30% of the ‘H270’ gain. The gain selector 220 may then compute the gainA as follows: A=(‘H000’ gain)*(0.7)+(‘H270’ gain)*(0.3). Similarcomputations may be performed when the theta angle corresponds toeven-numbered zones (i.e., 4, 6, and 8), when the delta anglecorresponds to even-numbered zones (i.e., 2, 4, 6, and 8), and when thephi angle corresponds to even-numbered zones (i.e., 2, 4, 6, and 8).

Referring to FIG. 2 , the driver circuit 110 may be further configuredto process the gyro velocity signal G_(VEL), apply a gain A to the gyrovelocity signal G_(VEL), and transform the gyro velocity signal G_(VEL)into the drive signal S_(DR). For example, the driver circuit 110 maycomprise a second circuit portion 202 to receive the gyro velocitysignal G_(VEL) and may comprise a gyro filter 225, a gain applicationcircuit 230, a PID filter 235, and a digital-to-analog converter (DAC)240.

The gyro filter 225 performs various functions on a signal (e.g., thegyro velocity signal G_(VEL)), such as integration and frequencycharacteristic adjustment (i.e., DC cutting). For example, the gyrofilter 225 may integrate an angular velocity of the gyro velocity signalG_(VEL) and prevent transmission of gyro signals at undesiredfrequencies. The gyro filter 225 may be coupled between the gyro sensor105 and the gain application circuit 230. In various embodiments, thegyro filter 225 may comprise an interface (I/F) circuit (not shown) andan integrator circuit (not shown).

The gain application circuit 230 may be configured to receive an inputsignal, such as the gyro velocity signal G_(VEL), and apply a gain valueA to the input signal. For example, the gain application circuit 230 maybe connected to the gain selector 220 and receive a gain A thatcorresponds to the selected gain (from the predetermine gain values) ora computed gain (in the case where the ratio is calculated). The gainapplication circuit 230 may be further connected to the gyro filter 225and receive the gyro velocity signal G_(VEL) via the gyro filter 225.Accordingly, the gain application circuit 230 may apply the gain Areceived from the gain selector 220 to the gyro velocity signal G_(VEL).The gain application circuit 230 may comprise an amplifier circuit orany other circuit and/or system suitable for receiving an input signaland applying a gain to the input signal.

The PID (proportional-integral-derivative) filter 235 may be configuredto receive an error value, such as the gyro velocity signal GVEL, andapply a correction based on proportional, integral and derivative terms.The PID filer 235 may operate to minimize the error over time byadjusting a control variable PIDout. The PID filer 235 may comprise aconventional PID controller circuit. For example, the PID controller 235may comprise a P controller (not shown) to account for present values ofthe error, an I controller (not shown) to account for past values of theerror, and a D controller (not shown) to account for possible futuretrends of the error, based on a current rate of change.

According to an exemplary embodiment, the PID 235 may be connected toand receive the gyro velocity signal G_(VEL) from the gain applicationcircuit 230. The PID filter 235 may generate the control variable PIDoutbased on the gyro velocity signal GVEL. The PID filer 235 may transmitthe control variable PIDout to the DAC 240. In various embodiments, thePID filer 235 may comprise circuitry to remove noise from the variousPID process signals.

The DAC 240 may be configured to convert a digital input signal into ananalog signal. For example, the DAC 240 may receive the control signalPIDout from the PID filter 235 and convert it into the drive signalS_(DR). The DAC 240 may be connected to an output terminal of the PIDfilter 235 and may transmit the drive signal S_(DR) to the actuator 115.The DAC 240 may comprise any suitable circuit and/or system suitable forconverting a digital signal into analog signal.

In operation, and referring to FIGS. 1-10 , the driver circuit 110 maycalibrate the drive signal S_(DR) according to the particular positionof the electronic device 300. According to an exemplary embodiment,calibrating the drive signal S_(DR) may comprise receiving an inputsignal, such as the gyro signal having an x-component, a y-component,and a z-component, from the gyro sensor 105. Calibrating the drivesignal may further comprise computing various angles, such as the thetaangle, the delta angle, and the phi angle, based on the x-, y-, andz-components, as described above.

Calibrating the drive signal may further comprise determining a gain. Inan exemplary embodiment, the driver circuit 110 may select one of thepredetermined gain values from the memory 200 if one of the computedangles (i.e., theta, delta, and phi) is equal to zero. In addition, theremaining angles may be assigned to one of the fixed zones (e.g., zones1, 3, 5, and 7). For example, if the theta angle falls within zone 1,the delta angle falls within zone 1, and the phi angle is zero, then thedriver circuit 110 may select the ‘H000’ gain. If the theta angle fallswithin zone 3, the phi angle falls within zone 3, and the delta angle iszero, then the driver circuit 110 may select the ‘H270’ gain. The drivercircuit 110 may compare the angles to six fixed combinations thatcorrespond to each of the predetermined gain values.

If the angles do not meet the criteria of the six fixed combinations,then the driver circuit 110 may compute a gain. Computing the gain maycomprise computing the ratio, as described above, based on an actualvalue of one of the angles and zone threshold angles (e.g., highthreshold angle and low threshold angle).

The driver circuit 110 may then generate the gain signal A, which mayrepresent either a predetermined gain value or a computed gain value,and apply the gain to the input signal. The input signal may then beconverted into the drive signal S_(DR), for example by utilizing the PIDfilter 235 and other feedback signals, such as from the hall sensor.

Embodiments of the present technology may compensate for the effect thatgravity has on various components in the system 100. For example, andreferring to FIGS. 3 and 4 , given a particular target position (code),the actual lens position may vary depending on the posture of theelectronic device 300. The target position (code) may correspond to aparticular current value applied to the actuator 115, so when aparticular lens position is desired, the amount of current required bythe actuator 115 may be different based on the particular posture of theelectronic device 300 at that instance. Accordingly, the gain A appliedto the gyro signal takes the posture of the electronic device 300 intoconsideration to generate an appropriate drive signal S_(DR) that willmove the lens 120 to the desired position.

In the foregoing description, the technology has been described withreference to specific exemplary embodiments. The particularimplementations shown and described are illustrative of the technologyand its best mode and are not intended to otherwise limit the scope ofthe present technology in any way. Indeed, for the sake of brevity,conventional manufacturing, connection, preparation, and otherfunctional aspects of the method and system may not be described indetail. Furthermore, the connecting lines shown in the various figuresare intended to represent exemplary functional relationships and/orsteps between the various elements. Many alternative or additionalfunctional relationships or physical connections may be present in apractical system.

The technology has been described with reference to specific exemplaryembodiments. Various modifications and changes, however, may be madewithout departing from the scope of the present technology. Thedescription and figures are to be regarded in an illustrative manner,rather than a restrictive one and all such modifications are intended tobe included within the scope of the present technology. Accordingly, thescope of the technology should be determined by the generic embodimentsdescribed and their legal equivalents rather than by merely the specificexamples described above. For example, the steps recited in any methodor process embodiment may be executed in any order, unless otherwiseexpressly specified, and are not limited to the explicit order presentedin the specific examples. Additionally, the components and/or elementsrecited in any apparatus embodiment may be assembled or otherwiseoperationally configured in a variety of permutations to producesubstantially the same result as the present technology and areaccordingly not limited to the specific configuration recited in thespecific examples.

Benefits, other advantages and solutions to problems have been describedabove with regard to particular embodiments. Any benefit, advantage,solution to problems or any element that may cause any particularbenefit, advantage or solution to occur or to become more pronounced,however, is not to be construed as a critical, required or essentialfeature or component.

The terms “comprises”, “comprising”, or any variation thereof, areintended to reference a non-exclusive inclusion, such that a process,method, article, composition or apparatus that comprises a list ofelements does not include only those elements recited, but may alsoinclude other elements not expressly listed or inherent to such process,method, article, composition or apparatus. Other combinations and/ormodifications of the above-described structures, arrangements,applications, proportions, elements, materials or components used in thepractice of the present technology, in addition to those notspecifically recited, may be varied or otherwise particularly adapted tospecific environments, manufacturing specifications, design parametersor other operating requirements without departing from the generalprinciples of the same.

The present technology has been described above with reference to anexemplary embodiment. However, changes and modifications may be made tothe exemplary embodiment without departing from the scope of the presenttechnology. These and other changes or modifications are intended to beincluded within the scope of the present technology, as expressed in thefollowing claims.

The invention claimed is:
 1. A method of generating a drive signal, themethod comprising: receiving an input signal, wherein the input signalcomprises an x-component, a y-component, and a z-component; computing afirst angle based on the y-component and the x-component, a second anglebased on the z-component and the x-component, and a third angle based onthe y-component and the z-component; converting the first, second, andthird angles to one of a plurality of zones, wherein each zone isdefined according to a corresponding range of angles; in response todetermining that one of the first, second, and third angles has a zerovalue: selecting a particular zone of the plurality of zones based ontwo remaining nonzero angles among the first, second, and third angles;assigning the particular zone to the one of the first, second, and thirdangles whose value is zero; in response to determining that the tworemaining nonzero angles of the first, second, and third angles are in asame zone, selecting a particular gain value from a plurality ofpredetermined gain values, otherwise determining that no gain value ofthe plurality of predetermined gain values is appropriate; andgenerating the drive signal according to the input signal and theparticular gain value.
 2. The method according to claim 1, furthercomprising generating, in response to determining that no gain value isappropriate, the particular gain value based on a ratio, wherein theratio comprises an actual angle of one of the first, second, and thirdangles, and a high threshold angle and a low threshold angle.
 3. Themethod of claim 1, wherein: the first angle is based on an arctangent ofthe y-component divided by the x-component; the second angle is based onthe arctangent of the z-component divided by the x-component; and thethird angle is based on the arctangent of the y-component divided by thez-component.
 4. The method of claim 1, wherein the input signalcorresponds to an acceleration signal of a gyroscope.
 5. The method ofclaim 4, further comprising receiving an angular velocity signal fromthe gyroscope.
 6. The method of claim 5, wherein generating the drivesignal includes applying the particular gain value to the angularvelocity signal to generate a modified signal, and generating the drivesignal based on the modified signal.
 7. A system, comprising: a gyrosensor capable of generating a gyro signal having an x-component, ay-component, and a z-component; a driver circuit connected to the gyrosensor and comprising: a first circuit portion connected to the gyrosensor comprising at least a processor and a non-transitory memory andconfigured to: compute a first angle, a second angle, and a third angleaccording to the gyro signal; determine whether one of the first,second, and third angles have a zero value; select, in response to oneof the first, second, and third angles having a zero value, one of aplurality of predetermined zones, each predetermined zone of theplurality of predetermined zones representing a range of angles, basedon the remaining angles and assigning the predetermined zone to theangle equaling zero; select a first gain value from a plurality ofpredetermined gain values based on the first, second, and third angles,wherein at least one of the first, second, and third angles is equal tozero; and in response to a determination that no gain value isappropriate, generate the first gain value based on a ratio of a firstdifference between an angle associated with an even zone and a lowvalue, and a second difference between a high value and the low value,wherein the low value corresponds to a low magnitude angle of a lowestzone, and the high value corresponds to a high magnitude angle of ahighest zone; and a second circuit portion connected to the gyro sensorand configured to receive the first gain value and generate a drivesignal according to the gyro signal and the first gain value; and anactuator responsive to the drive signal.
 8. The system according toclaim 7, wherein: the first angle is an arctangent of the y-componentdivided by the x-component; the second angle is defined as thearctangent of the z-component divided by the x-component; and the thirdangle is defined as the arctangent of the y-component divided by thez-component.
 9. The system according to claim 7, wherein the firstcircuit portion is further configured to: convert the first, second, andthird angles to one of a plurality of zones, wherein each zone isdefined according to a range of angles; determine, in response to one ofthe first, second, and third angles having a zero value, whether theremaining two nonzero angles are in the same zone; determine, inresponse to the remaining two nonzero angles not being in the same zone,that no predetermined gain value is appropriate; and select, in responseto the remaining two nonzero angles being in the same zone, apredetermined gain value associated with the zone.
 10. The systemaccording claim 7, wherein the plurality of predetermined gain valuescomprises six values.
 11. The system of claim 7, wherein the gyro signalincludes an acceleration signal and an angular velocity signal.
 12. Thesystem of claim 11, wherein the x-component, the y-component, and thez-component are included in the acceleration signal.
 13. The system ofclaim 12, wherein to generate the drive signal, the second circuitportion is further configured to apply the first gain value to theangular velocity signal.
 14. A method of generating a drive signal, themethod comprising: receiving an acceleration signal and an angularvelocity signal, wherein the acceleration signal comprises anx-component, a y-component, and a z-component; computing a first angleby determining a first arctangent of the y-component divided by thex-component; computing a second angle by determining a second arctangentof the z-component divided by the x-component; computing a third angleby determining a third arctangent of the y-component divided by thez-component; determining whether one of the first, second, and thirdangles has a zero value; selecting, in response to one of the first,second, and third angles having a zero value, one of a plurality ofpredetermined zones, each predetermined zone of the plurality ofpredetermined zones representing a range of angles, based on theremaining angles and assigning the predetermined zone to the angleequaling zero; selecting a first gain value from a plurality ofpredetermined gain values based on the first, second, and third angles;applying the first gain value to a filtered version of the angularvelocity signal to generate a modified signal; and generating the drivesignal based on the modified signal.
 15. The method according to claim14, further comprising generating, in response to determining no gainvalue is appropriate, the first gain value based on a ratio, wherein theratio comprises an actual angle of one of the first, second, and thirdangles, and a high threshold angle and a low threshold angle.
 16. Themethod of claim 15, wherein generating the first gain value based on theratio includes determining a first difference between an angleassociated with an even zone and a low value, and determining a seconddifference between a high value and the low value, wherein the low valuecorresponds to a low magnitude angle of a lowest zone, and the highvalue corresponds to a high magnitude angle of a highest zone.
 17. Themethod according to claim 14, further comprising: converting the first,second, and third angles to one of a plurality of zones, wherein eachzone is defined according to a range of angles; determining, in responseto one of the first, second, and third angles having a zero value,whether the two remaining nonzero angles are in the same zone;determining, in response to the two remaining nonzero angles not beingin the same zone, that no predetermined gain value is appropriate; andselecting, in response to the two remaining nonzero angles being in thesame zone, a predetermined gain value associated with the zone.
 18. Themethod of claim 14, further comprising filtering the acceleration signalprior to computing the first angle, the second angle, and the thirdangle.
 19. The method of claim 18, wherein filtering the accelerationsignal includes separately filtering the x-component, the y-component,and the z-component of the acceleration signal.